import { get, post } from '@/libs/axios'

const order = {
    // 分页列表
    page(queryData) {
        return get('/order/page', queryData)
    },
    // 单条信息
    info(id) {
        return get('/order/info', { id: id })
    },
    // 保存
    save(formData) {
        return post('/order/save', formData)
    },
    // 删除
    del(id) {
        return post('/order/delete', { id: id })
    },
    //支付日志
    payPage(queryData) {
        return get('/paylog/page', queryData)
    },
    //获取待发货的商品列表
    getItemsInfo(formData){
        return post('/order/getItemsInfo', formData)
    },
    // 单条信息
    logisticsInfo(id) {
        return get('/order/logisticsInfo', { id: id })
    },
    // 物流保存
    saveLogistics(formData) {
        return post('/order/saveLogistics', formData)
    },
    // 获取物流公司信息
    logisticsAll() {
        return get('/order/logisticsAll')
    },
    //获取物流信息
    logisticsLog(formData) {
        return get('/order/logisticsLog',formData)
    },
    //退款分页列表
    outPage(queryData) {
        return get('/order/orderOutPage', queryData)
    },
    //退款删除
    outDel(id) {
        return post('/order/orderOutDelete', { id: id })
    },
    //退款编辑
    outEdit(formData) {
        return post('/order/orderOutEdit', formData)
    },
    //退款单条信息
    outInfo(formData) {
        return post('/order/orderOutInfo', formData)
    },
    //确认收货
    confirmTake(id) {
        return get('/order/confirmTake', { id: id })
    },
    //取消订单
    cancelOrder(id) {
        return get('/order/cancelOrder', { id: id })
    },
    //后台支付
    payOrder(id) {
        return get('/order/payOrder', { id: id })
    },
    //修改订单金额
    setOrderPrice(formData) {
        return post('/order/setOrderPrice', formData)
    },
    //设置实际收款金额并确认支付
    setPayOrder(formData){
        return post('/order/setPayOrder', formData)
    },
    //修改收货地址
    setAddress(formData){
        return post('/order/setTakeAddress', formData)
    },
    //修改快递单号
    setLogisticsNumber(formData){
        return post('/order/setLogisticsNumber', formData)
    },
     //获取进货商统计
     distributorPage(formData){
        return get('/order/distributorPage', formData)
    }
}

export default order
